<?php

session_cache_expire(999999999);
if (!isset($_SESSION)) {
    session_start();
}
include '../operations/connection.php';

$listreference = $_SESSION['listreference4'];
$namereference = $_SESSION['namereference4'];
$i = $_SESSION['slreference4'];

mysql_query("DELETE FROM `list_sendmailmoney`");

for ($j = 0; $j < $i; $j++) {
    mysql_query("INSERT INTO `list_sendmailmoney` (`employee_id`) VALUES ('" . $listreference[$j] . "')");
}

mysql_close($connection);
?>